package com.eat.fish_service.entity.Dao;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import java.util.Date;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

/**
 * <p>
 * 
 * </p>
 *
 * @author CZF
 * @since 2022-04-11
 */
@Data
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="Equipment对象", description="用来表示鱼缸的设备")
public class Equipment implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键id")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private String id;

    @ApiModelProperty(value = "所属鱼缸id")
    private Long pid;

    @ApiModelProperty(value = "设备类型")
    private String type;

    @ApiModelProperty(value = "设备状态 0:关闭 1：开启 2：故障")
    private Integer state;

    @ApiModelProperty(value = "设备型号")
    private String message;

    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty(value = "创建时间")
    private Date gmtCreate;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty(value = "修改时间")
    private Date gmtModified;


    public Equipment(Long pid,String type,Integer state,String message){
        this.pid = pid;
        this.type = type;
        this.state = state;
        this.message = message;
    }


}
